package com.chukun.flink.stream.window.join.extractor;

import com.chukun.flink.stream.window.join.bean.ClickBean;
import org.apache.flink.api.common.eventtime.TimestampAssigner;

/**
 * @author chukun
 * @version 1.0.0
 * @description 抽取事件时间
 * @createTime 2022年05月26日 23:49:00
 */
public class ClickBeanEventTimestampExtractor implements TimestampAssigner<ClickBean> {
    @Override
    public long extractTimestamp(ClickBean clickBean, long timestamp) {
        return clickBean.getVisitTime().getTime();
    }
}
